package so.ruo.api;

import com.attilax.io.filex;
import com.attilax.lang.IniEx;
import com.attilax.net.websitex;
import com.attilax.shbye.YejmX;

/**
 * so.ruo.api.Test
 * @author Administrator
 *
 */
public class Test {

	/**
	 *  
61.156.217.81:80
小葱 14:57:35 
这个是可用的代理ip地址
之前的那个失效了
小葱 16:10:59 
119.187.113.216:81
	 * @param args
	 * @throws IniEx 
	 */
	public static void main(String[] args) throws IniEx {
	
		boolean flag = false;
		Api api = new Api();
		Proxy proxy = null;
		String username = null;
		String password = null;
		SiteType siteType = null;
		String comment = null;
		String url = null;

		try {
//hi，在么兄弟，有在做我的那个么，给你个代理ip测试用：120.192.92.185:80
			// 代理IP
			 proxy = new Proxy("119.187.113.216", 81, ProxyType.HTTP);

//			// 网易
//			username = "yokiss7890@163.com";
//			password = "yokiss78900";
//			siteType = SiteType.WANGYI;
//			// comment = new String("我回家先把日志本.烧掉先.各位先聊!".getBytes(), "gbk");
//			comment = "医院.啊哈";
//			url = "http://news.163.com/15/0731/04/AVQVLTRG0001124J.html";
//			
//			
//			
//			// 凤凰
//			username = "13119597491";
//			password = "163%40com";
//			siteType = SiteType.IFENG;
//			// comment = new String("NO.OH.可以这样子吗?".getBytes(), "gb2312");
//			comment = "可能吧.";
//			url = "http://news.ifeng.com/a/20150520/43799514_0.shtml";
			

			// 新浪
			username = "18922700901";
			password = "zhou870616zyh";
			siteType = SiteType.SINA;
			comment = "attilax velcome";
			url = "http://news.sina.com.cn/w/2015-08-07/134332181934.shtml";
			
			String file_save_Path = "c:/0jpg/"+filex.getUUidName()+".jpg";
		//	websitex.WebpageContent_jpg("http://login.sina.com.cn/cgi/pin.php?r=95220199&s=0&p=xd-976f533eb801fa7b94804eeea4b5f2c236bd", file_save_Path);
			flag = api.comment(username, password, siteType, comment, url, proxy);

//			// 搜狐
//			username = "kokiss1230@sohu.com";
//			password = "kokiss12300";
//			siteType = SiteType.SOHU;
//			comment = new String(("OK.NO问题的.").getBytes(), "utf-8");
//			url = "http://news.sohu.com/20150804/n418148892.shtml";
			
			

			
		} catch (Exception e) {
			e.printStackTrace();
			throw new RuntimeException(e);
		}
		System.out.println("------------------------------" + flag + "------------------------------");
		System.out.println(api.getMsg());

	}

}
